<!DOCTYPE html>
<html lang="en">

<html xmlns:th="http://www.thymeleaf.org">

<head>

	<!--字体图标-->
	<link href="javaex/pc/css/icomoon.css" rel="stylesheet" />
	<!--动画-->
	<link href="javaex/pc/css/animate.css" rel="stylesheet" />
	<!--骨架样式-->
	<link href="javaex/pc/css/common.css" rel="stylesheet" />
	<!--jquery，不可修改版本-->
	<script src="javaex/pc/lib/jquery-1.7.2.min.js"></script>
	<!--全局动态修改-->
	<script src="javaex/pc/js/common.js"></script>
	<!--核心组件-->
	<script src="javaex/pc/js/javaex.min.js"></script>
	<!--表单验证-->
	<script src="javaex/pc/js/javaex-formVerify.js"></script>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta name="description" content="Xenon Boostrap Admin Panel" />
	<meta name="author" content="" />
	
	<title>Xenon - Data Tables</title>

	<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Arimo:400,700,400italic">
	<link rel="stylesheet" href="assets/css/fonts/linecons/css/linecons.css">
	<link rel="stylesheet" href="assets/css/fonts/fontawesome/css/font-awesome.min.css">
	<link rel="stylesheet" href="assets/css/bootstrap.css">
	<link rel="stylesheet" href="assets/css/xenon-core.css">
	<link rel="stylesheet" href="assets/css/xenon-forms.css">
	<link rel="stylesheet" href="assets/css/xenon-components.css">
	<link rel="stylesheet" href="assets/css/xenon-skins.css">
	<link rel="stylesheet" href="assets/css/custom.css">
	<link rel="stylesheet" href="pagination/pagination.css">
    <link rel="stylesheet" href="layer/theme/default/layer.css">
	<script src="assets/js/jquery-1.11.1.min.js"></script>

	<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!--[if lt IE 9]>
		<script src="assets/js/html5shiv.min.js"></script>
		<script src="assets/js/respond.min.js"></script>
	<![endif]-->
	
	
</head>
<body class="page-body">

	<div class="settings-pane">
			
		<a href="#" data-toggle="settings-pane" data-animate="true">
			&times;
		</a>

		<div class="settings-pane-inner">

			<div class="row">

				<div class="col-md-4">

					<div class="user-info">

						<div class="user-image">
							<a href="javascript:;" >
								<img th:src="${session.user.aimage}" id="pp" class="img-responsive img-circle"/>

							</a>
						</div>

						<div class="user-details">

							<h3>
								<a href="#"><span th:text="${session.user.aname}"></span></a>

								<!-- Available statuses: is-online, is-idle, is-busy and is-offline -->
								<span class="user-status is-online"></span>
							</h3>

							<p class="user-title">程序猿</p>

							<div class="user-links">
								<button type="button" id="bb" class="btn btn-primary">编辑</button>
								<a href="logout" class="btn btn-success">登出</a>
							</div>

						</div>

					</div>

				</div>



			</div>

		</div>
		
	</div>
	
	<div class="page-container"><!-- add class "sidebar-collapsed" to close sidebar by default, "chat-visible" to make chat appear always -->
			
		<!-- Add "fixed" class to make the sidebar fixed always to the browser viewport. -->
		<!-- Adding class "toggle-others" will keep only one menu item open at a time. -->
		<!-- Adding class "collapsed" collapse sidebar root elements and show only icons. -->


		<div class="sidebar-menu toggle-others fixed">

			<div class="sidebar-menu-inner">

				<header class="logo-env">

					<!-- logo -->
					<div class="logo">
						<a href="#" class="logo-expanded">
							<img src="assets/images/logo@2x.png" width="80" alt=""/>
						</a>

						<a href="#" class="logo-collapsed">
							<img src="assets/images/logo-collapsed@2x.png" width="40" alt=""/>
						</a>
					</div>

					<!-- This will toggle the mobile menu and will be visible only on mobile devices -->
					<div class="mobile-menu-toggle visible-xs">
						<a href="#" data-toggle="user-info-menu">
							<i class="fa-bell-o"></i>
							<span class="badge badge-success">7</span>
						</a>

						<a href="#" data-toggle="mobile-menu">
							<i class="fa-bars"></i>
						</a>
					</div>

					<!-- This will open the popup with user profile settings, you can use for any purpose, just be creative -->
					<div class="settings-icon">
						<a href="#" data-toggle="settings-pane" data-animate="true">
							<i class="linecons-cog"></i>
						</a>
					</div>


				</header>


				<ul id="main-menu" class="main-menu">
					<!-- add class "multiple-expanded" to allow multiple submenus to open -->
					<!-- class "auto-inherit-active-class" will automatically add "active" class for parent elements who are marked already with class "active" -->
					<li class="active opened active">
						<a href="index">
							<i class="linecons-cog"></i>
							<span class="title">首页</span>
						</a>
					</li>
					<li>
						<a href="mapperindex">
							<i class="linecons-desktop"></i>
							<span class="title">超级管理员管理</span>
						</a>
						<ul>
							<li>
								<a href="mapperindex">
									<span class="title">管理员</span>
								</a>
							</li>

							<li>
								<a href="jumproleindex">
									<span class="title">角色管理</span>
								</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="jumpRoute">
							<i class="linecons-note"></i>
							<span class="title">管理员管理</span>
						</a>
						<ul>
							<li>
								<a href="jumpRoute">
									<span class="title">航空管理</span>
								</a>
							</li>
							<li>
								<a href="jumpgoodslist">
									<span class="title">商品管理</span>
								</a>
							</li>
							<li>
								<a href="jumpBoat">
									<span class="title">船只管理</span>
								</a>
							</li>
							<li>
								<a href="jumpbox">
									<span class="title">集装箱管理</span>
								</a>
							</li>
							<li>
								<a href="orderlist.to">
									<span class="title">订单管理</span>
								</a>
							</li>
						</ul>
					</li>

					<li>
						<a href="orderstatistics.to">
							<i class="linecons-database"></i>
							<span class="title">统计</span>
						</a>
						<ul>
							<li>
								<a href="orderstatistics.to">
									<span class="title">订单统计</span>
								</a>
							</li>
							<li>
								<a href="incomeStatis.to">
									<span class="title">收益统计</span>
								</a>
							</li>
						</ul>
					</li>

				</ul>

			</div>

		</div>




		<div class="main-content">

			<!-- User Info, Notifications and Menu Bar -->
			<nav class="navbar user-info-navbar" role="navigation">

				<!-- Left links for user info navbar -->
				<ul class="user-info-menu left-links list-inline list-unstyled">

					<li class="hidden-sm hidden-xs">
						<a href="#" data-toggle="sidebar">
							<i class="fa-bars"></i>
						</a>
					</li>


				</ul>


				<!-- Right links for user info navbar -->
				<ul class="user-info-menu right-links list-inline list-unstyled">

					<li class="search-form"><!-- You can add "always-visible" to show make the search input visible -->

					</li>


					<li class="dropdown user-profile">
						<a href="#" data-toggle="dropdown">
							<img th:src="${session.user.aimage}" alt="user-image" class="img-circle img-inline userpic-32" width="28" />
							<span>
								<span th:text="${session.user.aname}"></span>
								<i class="fa-angle-down"></i>
							</span>
						</a>

						<ul class="dropdown-menu user-profile-menu list-unstyled">
							<li class="last">
								<a href="logout">
									<i class="fa-lock"></i>
									Logout
								</a>
							</li>
						</ul>
					</li>

					<li>
						<a href="#" data-toggle="chat">
							<i class="fa-comments-o"></i>
						</a>
					</li>

				</ul>

			</nav>

			<div class="page-title">
				
				<div class="title-env">
					<h1 class="title">订单</h1>
					<p class="description">订单管理</p>
				</div>
				
					<div class="breadcrumb-env">
					
								<ol class="breadcrumb bc-1">
									<li>
							<a href="index"><i class="fa-home"></i>Home</a>
						</li>
								<li>
						
										<a href="orderlist.to">Tables</a>
								</li>
							<li class="active">
						
										<strong>Data Tables</strong>
								</li>
								</ol>
								
				</div>
					
			</div>



			<!--表格-->
			<!-- Removing search and results count filter -->
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">订单列表</h3>
					
					<div class="panel-options">
						<input type="text" class="text" placeholder="订单号" autocomplete="off" name="tiji"/>
						<button class="button wathet" th:onclick="'javascript : querytj()'">搜索</button>
						<a href="#" data-toggle="panel">
							<span class="collapse-icon">&ndash;</span>
							<span class="expand-icon">+</span>
						</a>
						<a href="#" data-toggle="remove">

						</a>
					</div>
				</div>
				<div class="panel-body">

					
					<table class="table table-bordered table-striped" >
						<thead>
							<tr>
								<th >
									<input type="checkbox"  name="allck">
								</th>
								<th>提单号</th>
								<th>船名 </th>
								<th>航次</th>
								<th> 班期 </th>
								<th>开航日期</th>
								<th>装港</th>
								<th>卸港</th>
								<th>海运费(USD) </th>
								<th>状态</th>
								<th>操作</th>
							</tr>
						</thead>
						
						<tbody class="middle-align" id="tblist">




						</tbody>
					</table>

					<div class="col-xs-6">
						<div class="dataTables_paginate paging_simple_numbers" id="example-2_paginate">
							<ul class="pagination" id="Pagination">


							</ul>
						</div>
					</div>

				</div>

			</div>

			<!-- Main Footer -->
			<!-- Choose between footer styles: "footer-type-1" or "footer-type-2" -->
			<!-- Add class "sticky" to  always stick the footer to the end of page (if page contents is small) -->
			<!-- Or class "fixed" to  always fix the footer to the end of page -->
			<footer class="main-footer sticky footer-type-1">

				<div class="footer-inner">

					<!-- Add your copyright text here -->
					<div class="footer-text">
						&copy; 2014
						<strong>Xenon</strong>
						More Templates <a href="#" target="_blank" title="长江航运">长江航运</a> - Collect from <a href="#/" title="一家做海运的网站" target="_blank">一家做海运的网站</a>
					</div>


					<!-- Go to Top Link, just add rel="go-top" to any link to add this functionality -->
					<div class="go-up">

						<a href="#" rel="go-top">
							<i class="fa-angle-up"></i>
						</a>

					</div>

				</div>

			</footer>



		</div>
		
			
		<!-- start: Chat Section -->
		<div id="chat" class="fixed">
			
			<div class="chat-inner">
			
				
				<h2 class="chat-header">
					<a href="#" class="chat-close" data-toggle="chat">
						<i class="fa-plus-circle rotate-45deg"></i>
					</a>
					
					Chat
					<span class="badge badge-success is-hidden">0</span>
				</h2>
				
				<script type="text/javascript">
				// Here is just a sample how to open chat conversation box
				jQuery(document).ready(function($)
				{
					var $chat_conversation = $(".chat-conversation");
					
					$(".chat-group a").on('click', function(ev)
					{
						ev.preventDefault();
						
						$chat_conversation.toggleClass('is-open');
						
						$(".chat-conversation textarea").trigger('autosize.resize').focus();
					});
					
					$(".conversation-close").on('click', function(ev)
					{
						ev.preventDefault();
						$chat_conversation.removeClass('is-open');
					});
				});
				</script>
				
				
				<div class="chat-group">
					<strong>Favorites</strong>
					
					<a href="#"><span class="user-status is-online"></span> <em>Catherine J. Watkins</em></a>
					<a href="#"><span class="user-status is-online"></span> <em>Nicholas R. Walker</em></a>
					<a href="#"><span class="user-status is-busy"></span> <em>Susan J. Best</em></a>
					<a href="#"><span class="user-status is-idle"></span> <em>Fernando G. Olson</em></a>
					<a href="#"><span class="user-status is-offline"></span> <em>Brandon S. Young</em></a>
				</div>
				
				
				<div class="chat-group">
					<strong>Work</strong>
					
					<a href="#"><span class="user-status is-busy"></span> <em>Rodrigo E. Lozano</em></a>
					<a href="#"><span class="user-status is-offline"></span> <em>Robert J. Garcia</em></a>
					<a href="#"><span class="user-status is-offline"></span> <em>Daniel A. Pena</em></a>
				</div>
				
				
				<div class="chat-group">
					<strong>Other</strong>
					
					<a href="#"><span class="user-status is-online"></span> <em>Dennis E. Johnson</em></a>
					<a href="#"><span class="user-status is-online"></span> <em>Stuart A. Shire</em></a>
					<a href="#"><span class="user-status is-online"></span> <em>Janet I. Matas</em></a>
					<a href="#"><span class="user-status is-online"></span> <em>Mindy A. Smith</em></a>
					<a href="#"><span class="user-status is-busy"></span> <em>Herman S. Foltz</em></a>
					<a href="#"><span class="user-status is-busy"></span> <em>Gregory E. Robie</em></a>
					<a href="#"><span class="user-status is-busy"></span> <em>Nellie T. Foreman</em></a>
					<a href="#"><span class="user-status is-busy"></span> <em>William R. Miller</em></a>
					<a href="#"><span class="user-status is-idle"></span> <em>Vivian J. Hall</em></a>
					<a href="#"><span class="user-status is-offline"></span> <em>Melinda A. Anderson</em></a>
					<a href="#"><span class="user-status is-offline"></span> <em>Gary M. Mooneyham</em></a>
					<a href="#"><span class="user-status is-offline"></span> <em>Robert C. Medina</em></a>
					<a href="#"><span class="user-status is-offline"></span> <em>Dylan C. Bernal</em></a>
					<a href="#"><span class="user-status is-offline"></span> <em>Marc P. Sanborn</em></a>
					<a href="#"><span class="user-status is-offline"></span> <em>Kenneth M. Rochester</em></a>
					<a href="#"><span class="user-status is-offline"></span> <em>Rachael D. Carpenter</em></a>
				</div>
			
			</div>
			
			<!-- conversation template -->
			<div class="chat-conversation">
				
				<div class="conversation-header">
					<a href="#" class="conversation-close">
						&times;
					</a>
					
					<span class="user-status is-online"></span>
					<span class="display-name">Arlind Nushi</span> 
					<small>Online</small>
				</div>
				
				<ul class="conversation-body">	
					<li>
						<span class="user">Arlind Nushi</span>
						<span class="time">09:00</span>
						<p>Are you here?</p>
					</li>
					<li class="odd">
						<span class="user">Brandon S. Young</span>
						<span class="time">09:25</span>
						<p>This message is pre-queued.</p>
					</li>
					<li>
						<span class="user">Brandon S. Young</span>
						<span class="time">09:26</span>
						<p>Whohoo!</p>
					</li>
					<li class="odd">
						<span class="user">Arlind Nushi</span>
						<span class="time">09:27</span>
						<p>Do you like it?</p>
					</li>
				</ul>
				
				<div class="chat-textarea">
					<textarea class="form-control autogrow" placeholder="Type your message"></textarea>
				</div>
				
			</div>
			
		</div>
		<!-- end: Chat Section -->
		
		
	</div>



	<script>


		// 或者下面这种写法
		$("#pp").click(function() {
			javaex.dialog({
				type : "image",	// 弹出层类型
				url : $(this).attr("src")	// 图片地址
			});
		});
	</script>

	<script>

		$("#bb").click(function() {
			javaex.dialog({
				type : "dialog",	// 弹出层类型
				width : "400",
				height : "500",
				url : "jumpedit"
			});
		});

	</script>



	<!-- Imported styles on this page -->
	<link rel="stylesheet" href="assets/js/datatables/dataTables.bootstrap.css">

	<!-- Bottom Scripts -->
	<script src="assets/js/bootstrap.min.js"></script>
	<script src="assets/js/TweenMax.min.js"></script>
	<script src="assets/js/resizeable.js"></script>
	<script src="assets/js/joinable.js"></script>
	<script src="assets/js/xenon-api.js"></script>
	<script src="assets/js/xenon-toggles.js"></script>
	<script src="assets/js/datatables/js/jquery.dataTables.min.js"></script>


	<!-- Imported scripts on this page -->
	<script src="assets/js/datatables/dataTables.bootstrap.js"></script>
	<script src="assets/js/datatables/yadcf/jquery.dataTables.yadcf.js"></script>
	<script src="assets/js/datatables/tabletools/dataTables.tableTools.min.js"></script>


	<!-- JavaScripts initializations and stuff -->
	<script src="assets/js/xenon-custom.js"></script>
	<script src="pagination/jquery.pagination.js"></script>
    <script src="layer/layer.js"></script>

	<script type="text/javascript">

		$(document).ready(function () {
           queryBypage(0);
		});

		var jsonstr={
			"pageNum":0
		}

		function queryBypage(pageNum){
			jsonstr.pageNum=pageNum+1;
			$.ajax({
				type:"post",
				url:"orderlist.do",
				data:jsonstr,
				success:function (result) {
                    var coment='';
                            var pge=result.page;
                            var orlist=pge.orderlist;
                            $.each(orlist,function (i,n) {

                                coment+='<tr>';
                                coment+='<td><input type="checkbox"  name="ckrid" value="'+n.oid+'"></td>';
                                coment+='<td><span>'+n.oid+'</span></td>';
                                coment+='<td><span>'+n.boat.sname+'</span></td>';
                                coment+=' <td><span>'+n.routeEntity.rid+'</span></td>';
                                coment+='<td><span>'+n.routeEntity.rname+'</span></td>';
                                coment+='<td><span>'+n.routeEntity.times+'</span></td>';
                                coment+='<td><span>'+n.routeEntity.splace+'</span></td>';
                                coment+='<td><span>'+n.routeEntity.aplace+'</span></td>';
                                coment+='<td><span>'+n.oprice+'</span></td>';
                               if (n.ostatus==3){
								   coment+='<td><a href="javascript:void(0);" class="btn btn-secondary btn-sm btn-icon icon-left">配送中</a></td>';
							   }else if(n.ostatus==2){
								   coment+='<td><a href="javascript:void(0);" class="btn btn-secondary btn-sm btn-icon icon-left">已支付</a></td>';
							   }else if(n.ostatus==4){
								   coment+='<td><a href="javascript:void(0);" class="btn btn-secondary btn-sm btn-icon icon-left">已完成</a></td>';
							   }
                                coment+='<td>';
                                coment+='<a href="javascript:void(0);" class="btn btn-secondary btn-sm btn-icon icon-left" onclick="javascript:detal(\''+n.oid+'\')">详情</a>';
								coment+='<a href="javascript:void(0);" class="btn btn-danger btn-sm btn-icon icon-left" onclick="javascript:del(\''+n.oid+'\',this)">删除</a>';
                                coment+='</td>';
                                coment+='</tr>';
                            })
					$("#tblist").html(coment);
					var num_entries=pge.count;
					$("#Pagination").pagination(num_entries, {
						num_edge_entries: 1, //边缘页数
						num_display_entries: 4, //主体页数
						callback: queryBypage,
						items_per_page:4, //每页显示1项
						current_page:pge.pageNum-1,
						prev_text:"上一页",
						next_text:"下一页"
					});
				}
			})
		}

		function querytj() {
			var tj = $("input[name=tiji]").val();
			alert(tj);
			jsonstr.qutj=tj;
			queryBypage(0);
		}

		function detal(oid) {
			// alert("ss0");
			$.ajax({
				type:"post",
				url:"orderdetail.do",
				data:{
					"oid":oid
				},
				success:function (result) {
					if (result.flag){
							javaex.dialog({
								type : "dialog",	// 弹出层类型
								width : "700",
								height : "450",
								url : "orderdetail.to"
							});

					}
				}
			})

		}

		function del(oid,event) {
     layer.confirm("确定删除"+oid+"订单吗！",{icon:3,title:"提示"},function (cindex) {
		 layer.close(cindex);
		 $.ajax({
			 type:"post",
			 url:"delByOid.do",
			 data:{
			 	"oid":oid
			 },
			 success:function (result) {
			 	if (result.flag){
			 		layer.msg("已删除！",{time:2000,icon:6,shift:6});
                    $(event).parent().parent().remove();
				}
			 }
		 })
	 })
		}


	</script>


	<script>


		// 或者下面这种写法
		$("#pp").click(function() {
			javaex.dialog({
				type : "image",	// 弹出层类型
				url : $(this).attr("src")	// 图片地址
			});
		});
	</script>

	<script>

		$("#bb").click(function() {
			javaex.dialog({
				type : "dialog",	// 弹出层类型
				width : "400",
				height : "500",
				url : "jumpedit"
			});
		});

	</script>
</body>
</html>